Add MeshCore pyMC poller, mesh link SNR alerts, and APRS weather parsing#67
Open
d3mocide wants to merge 1 commit into
Open
Add MeshCore pyMC poller, mesh link SNR alerts, and APRS weather parsing#67d3mocide wants to merge 1 commit into
d3mocide wants to merge 1 commit into
Conversation
1A — /mesh/topology?include_coords=true enriches each node with
lat/lon fetched via Redis MGET on entity:{node_id} keys.
1B — APRS weather comment parser (poller/enrichment/aprs_weather.py)
extracts temp, humidity, pressure, wind, rain from Ultimeter/Davis
comment strings; wired into aprs.py for station_type=weather entities,
stored under identity.wx.
1C — SNR threshold alert infrastructure: mesh_link_alerts.py tracks
per-link SNR history and fires mesh_link_degraded events on the falling
edge with a cooldown gate; wired into _upsert_mesh_links in meshcore.py.
DB migration 10_mesh_alert_config.sql adds the per-source config table.
Feature 3 — APRS weather panel: AprsOverview shows a live conditions
card (temp/humidity/pressure/wind/rain) when identity.wx is present;
EntityDetail exposes a Weather tab for APRS weather stations alongside
the existing aircraft METAR tab.
pyMC poller — meshcore_pymc.py uses the `meshcore` Python library
(meshcore>=2.3.0) to connect directly to a MeshCore device over TCP
or serial, fetching the full contact table with adv_lat/adv_lon
coordinates and calling fetch_all_neighbours() per contact to capture
SNR as measured by remote nodes — a dimension unavailable via the
RemoteTerm REST/WS path.
Also notes: Feature 1 (APRS symbol color-coding) was already complete
in buildEntityLayers.ts (aprsColor, emergencyRingLayer, aprsLabelLayer).
https://claude.ai/code/session_01J3kpNrV5xm55N17Uu7NU61
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds three major features to enhance mesh network monitoring and APRS weather station support:
MeshCore pyMC poller — A new direct-access poller for MeshCore devices that captures bi-directional link metrics (SNR measured by each remote node) via the
meshcorePython library, supporting both TCP and serial connections.Mesh link SNR threshold alerts — A new alert infrastructure that monitors per-link SNR history and fires
mesh_link_degradedevents when links drop below configured thresholds, with cooldown gating to prevent alert floods.APRS weather station support — Enhanced APRS poller to parse Ultimeter/Davis-style weather comments and display live conditions (temperature, humidity, wind, pressure, rainfall) in the entity detail panel.
Key Changes
Backend & Poller
poller/pollers/meshcore_pymc.py(new)mesh_linkstabletcp://host:portorserial:///dev/ttyUSB0?baudrate=9600poller/mesh_link_alerts.py(new)mesh_alert_configstable with 60s TTLmesh_link_degradedevents to database and Redis pub/subdb/init/10_mesh_alert_config.sql(new)mesh_alert_configstable for per-source SNR thresholds and cooldown settingssource_urlfor efficient lookupspoller/pollers/meshcore.py(modified)check_link_degradation()for each link with valid SNRpoller/pollers/aprs.py(modified)temp_f,humidity,wind_mph,pressure_mb,rain_in, etc.) in entity identitypoller/enrichment/aprs_weather.py(new)Noneif no weather data detectedpoller/main.py(modified)MeshCorePymcPollerin poller registrypoller/requirements.txt(modified)meshcore>=2.3.0dependencyBackend API
backend/routers/mesh.py(modified)include_coordsquery parameter to/mesh/topologyendpointid,lat,loninstead of bare stringsFrontend
frontend/src/components/panels/entity/AprsOverview.tsx(modified)station_type === 'weather'and weather data is present**`frontend
https://claude.ai/code/session_01J3kpNrV5xm55N17Uu7NU61